#include <iostream>
using namespace std;
#include <boost/scope_exit.hpp>
using namespace boost;

int main()
{
    cout << "--- Start ---" << endl;
    int *p = new int [100]; 
    BOOST_SCOPE_EXIT((p)) {
        cout << "scope_exit called." << endl;
        delete [] p;
    } BOOST_SCOPE_EXIT_END
    cout << "--- End ---" << endl;
    return 0;
}
